Integrand size = 18, antiderivative size = 126 \[ \int x \csc ^3(a+b x) \sec ^2(a+b x) \, dx=-\frac {3 x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {\text {arctanh}(\sin (a+b x))}{b^2}-\frac {\csc (a+b x)}{2 b^2}+\frac {3 i \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{2 b^2}-\frac {3 i \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{2 b^2}+\frac {3 x \sec (a+b x)}{2 b}-\frac {x \csc ^2(a+b x) \sec (a+b x)}{2 b} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {2702, 294, 327, 213, 4505, 6406, 12, 4268, 2317, 2438, 3855, 2701} \[ \int x \csc ^3(a+b x) \sec ^2(a+b x) \, dx=-\frac {\text {arctanh}(\sin (a+b x))}{b^2}-\frac {3 x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {3 i \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{2 b^2}-\frac {3 i \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{2 b^2}-\frac {\csc (a+b x)}{2 b^2}+\frac {3 x \sec (a+b x)}{2 b}-\frac {x \csc ^2(a+b x) \sec (a+b x)}{2 b} \]
[In]
[Out]
Rule 12
Rule 213
Rule 294
Rule 327
Rule 2317
Rule 2438
Rule 2701
Rule 2702
Rule 3855
Rule 4268
Rule 4505
Rule 6406
Rubi steps \begin{align*} \text {integral}& = -\frac {3 x \text {arctanh}(\cos (a+b x))}{2 b}+\frac {3 x \sec (a+b x)}{2 b}-\frac {x \csc ^2(a+b x) \sec (a+b x)}{2 b}-\int \left (-\frac {3 \text {arctanh}(\cos (a+b x))}{2 b}+\frac {3 \sec (a+b x)}{2 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{2 b}\right ) \, dx \\ & = -\frac {3 x \text {arctanh}(\cos (a+b x))}{2 b}+\frac {3 x \sec (a+b x)}{2 b}-\frac {x \csc ^2(a+b x) \sec (a+b x)}{2 b}+\frac {\int \csc ^2(a+b x) \sec (a+b x) \, dx}{2 b}+\frac {3 \int \text {arctanh}(\cos (a+b x)) \, dx}{2 b}-\frac {3 \int \sec (a+b x) \, dx}{2 b} \\ & = -\frac {3 \text {arctanh}(\sin (a+b x))}{2 b^2}+\frac {3 x \sec (a+b x)}{2 b}-\frac {x \csc ^2(a+b x) \sec (a+b x)}{2 b}-\frac {\text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\csc (a+b x)\right )}{2 b^2}+\frac {3 \int b x \csc (a+b x) \, dx}{2 b} \\ & = -\frac {3 \text {arctanh}(\sin (a+b x))}{2 b^2}-\frac {\csc (a+b x)}{2 b^2}+\frac {3 x \sec (a+b x)}{2 b}-\frac {x \csc ^2(a+b x) \sec (a+b x)}{2 b}+\frac {3}{2} \int x \csc (a+b x) \, dx-\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (a+b x)\right )}{2 b^2} \\ & = -\frac {3 x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {\text {arctanh}(\sin (a+b x))}{b^2}-\frac {\csc (a+b x)}{2 b^2}+\frac {3 x \sec (a+b x)}{2 b}-\frac {x \csc ^2(a+b x) \sec (a+b x)}{2 b}-\frac {3 \int \log \left (1-e^{i (a+b x)}\right ) \, dx}{2 b}+\frac {3 \int \log \left (1+e^{i (a+b x)}\right ) \, dx}{2 b} \\ & = -\frac {3 x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {\text {arctanh}(\sin (a+b x))}{b^2}-\frac {\csc (a+b x)}{2 b^2}+\frac {3 x \sec (a+b x)}{2 b}-\frac {x \csc ^2(a+b x) \sec (a+b x)}{2 b}+\frac {(3 i) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{2 b^2}-\frac {(3 i) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{i (a+b x)}\right )}{2 b^2} \\ & = -\frac {3 x \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {\text {arctanh}(\sin (a+b x))}{b^2}-\frac {\csc (a+b x)}{2 b^2}+\frac {3 i \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{2 b^2}-\frac {3 i \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{2 b^2}+\frac {3 x \sec (a+b x)}{2 b}-\frac {x \csc ^2(a+b x) \sec (a+b x)}{2 b} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(282\) vs. \(2(126)=252\).
Time = 3.69 (sec) , antiderivative size = 282, normalized size of antiderivative = 2.24 \[ \int x \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\frac {8 b x-2 \cot \left (\frac {1}{2} (a+b x)\right )-b x \csc ^2\left (\frac {1}{2} (a+b x)\right )+12 (a+b x) \left (\log \left (1-e^{i (a+b x)}\right )-\log \left (1+e^{i (a+b x)}\right )\right )+8 \log \left (\cos \left (\frac {1}{2} (a+b x)\right )-\sin \left (\frac {1}{2} (a+b x)\right )\right )-8 \log \left (\cos \left (\frac {1}{2} (a+b x)\right )+\sin \left (\frac {1}{2} (a+b x)\right )\right )-12 a \log \left (\tan \left (\frac {1}{2} (a+b x)\right )\right )+12 i \left (\operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )-\operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )\right )+b x \sec ^2\left (\frac {1}{2} (a+b x)\right )+\frac {8 b x \sin \left (\frac {1}{2} (a+b x)\right )}{\cos \left (\frac {1}{2} (a+b x)\right )-\sin \left (\frac {1}{2} (a+b x)\right )}-\frac {8 b x \sin \left (\frac {1}{2} (a+b x)\right )}{\cos \left (\frac {1}{2} (a+b x)\right )+\sin \left (\frac {1}{2} (a+b x)\right )}-2 \tan \left (\frac {1}{2} (a+b x)\right )}{8 b^2} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 518 vs. \(2 (108 ) = 216\).
Time = 0.70 (sec) , antiderivative size = 519, normalized size of antiderivative = 4.12
method | result | size |
risch | \(\frac {2 i {\mathrm e}^{i \left (x b +a \right )}+6 x b \,{\mathrm e}^{5 i \left (x b +a \right )}-4 x b \,{\mathrm e}^{3 i \left (x b +a \right )}+6 x b \,{\mathrm e}^{i \left (x b +a \right )}-3 i {\mathrm e}^{4 i \left (x b +a \right )} \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}+1\right )-4 i \arctan \left ({\mathrm e}^{i \left (x b +a \right )}\right ) {\mathrm e}^{4 i \left (x b +a \right )}-3 i {\mathrm e}^{4 i \left (x b +a \right )} \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}\right )+3 i {\mathrm e}^{6 i \left (x b +a \right )} \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}\right )+3 i {\mathrm e}^{6 i \left (x b +a \right )} \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}+1\right )+4 i \arctan \left ({\mathrm e}^{i \left (x b +a \right )}\right ) {\mathrm e}^{6 i \left (x b +a \right )}+3 \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right ) {\mathrm e}^{4 i \left (x b +a \right )} a -3 \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right ) {\mathrm e}^{6 i \left (x b +a \right )} a +3 \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right ) {\mathrm e}^{2 i \left (x b +a \right )} a -4 i \arctan \left ({\mathrm e}^{i \left (x b +a \right )}\right ) {\mathrm e}^{2 i \left (x b +a \right )}-3 i {\mathrm e}^{2 i \left (x b +a \right )} \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}\right )-3 i {\mathrm e}^{2 i \left (x b +a \right )} \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}+1\right )-3 \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) b x +3 \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) {\mathrm e}^{2 i \left (x b +a \right )} b x -3 \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) {\mathrm e}^{6 i \left (x b +a \right )} b x +3 \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) {\mathrm e}^{4 i \left (x b +a \right )} b x -2 i {\mathrm e}^{5 i \left (x b +a \right )}+4 i \arctan \left ({\mathrm e}^{i \left (x b +a \right )}\right )+3 i \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}\right )+3 i \operatorname {dilog}\left ({\mathrm e}^{i \left (x b +a \right )}+1\right )-3 a \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{2 b^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}-1\right )^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}\) | \(519\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 531 vs. \(2 (104) = 208\).
Time = 0.26 (sec) , antiderivative size = 531, normalized size of antiderivative = 4.21 \[ \int x \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\frac {6 \, b x \cos \left (b x + a\right )^{2} - 4 \, b x - 3 \, {\left (i \, \cos \left (b x + a\right )^{3} - i \, \cos \left (b x + a\right )\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - 3 \, {\left (-i \, \cos \left (b x + a\right )^{3} + i \, \cos \left (b x + a\right )\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - 3 \, {\left (i \, \cos \left (b x + a\right )^{3} - i \, \cos \left (b x + a\right )\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - 3 \, {\left (-i \, \cos \left (b x + a\right )^{3} + i \, \cos \left (b x + a\right )\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - 3 \, {\left (b x \cos \left (b x + a\right )^{3} - b x \cos \left (b x + a\right )\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - 3 \, {\left (b x \cos \left (b x + a\right )^{3} - b x \cos \left (b x + a\right )\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) - 3 \, {\left (a \cos \left (b x + a\right )^{3} - a \cos \left (b x + a\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) - 3 \, {\left (a \cos \left (b x + a\right )^{3} - a \cos \left (b x + a\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + 3 \, {\left ({\left (b x + a\right )} \cos \left (b x + a\right )^{3} - {\left (b x + a\right )} \cos \left (b x + a\right )\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + 3 \, {\left ({\left (b x + a\right )} \cos \left (b x + a\right )^{3} - {\left (b x + a\right )} \cos \left (b x + a\right )\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) - 2 \, {\left (\cos \left (b x + a\right )^{3} - \cos \left (b x + a\right )\right )} \log \left (\sin \left (b x + a\right ) + 1\right ) + 2 \, {\left (\cos \left (b x + a\right )^{3} - \cos \left (b x + a\right )\right )} \log \left (-\sin \left (b x + a\right ) + 1\right ) + 2 \, \cos \left (b x + a\right ) \sin \left (b x + a\right )}{4 \, {\left (b^{2} \cos \left (b x + a\right )^{3} - b^{2} \cos \left (b x + a\right )\right )}} \]
[In]
[Out]
\[ \int x \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\int x \csc ^{3}{\left (a + b x \right )} \sec ^{2}{\left (a + b x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1173 vs. \(2 (104) = 208\).
Time = 0.49 (sec) , antiderivative size = 1173, normalized size of antiderivative = 9.31 \[ \int x \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int x \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\int { x \csc \left (b x + a\right )^{3} \sec \left (b x + a\right )^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int x \csc ^3(a+b x) \sec ^2(a+b x) \, dx=\int \frac {x}{{\cos \left (a+b\,x\right )}^2\,{\sin \left (a+b\,x\right )}^3} \,d x \]
[In]
[Out]